package com.mocha.bss.domain.org.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mocha.bss.feign.bo.UserInfoBO;
import com.mocha.bss.domain.org.repository.entity.UserEntity;
import com.mocha.bss.domain.org.contoller.query.UserQuery;
import com.mocha.bss.org.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author songkui
 * @since 2022-03-11
 */
@Mapper
public interface MochaUserMapper extends BaseMapper<UserEntity> {

    Page<UserEntity> findByRole(Page<UserEntity> page);

    Page<UserInfoBO> findByQuery(Page<UserInfoBO> page, @Param("query") UserQuery<UserInfoBO> query);
    List<UserInfoBO> listByQuery( @Param("query") UserQuery<UserInfoBO> query);

    Page<UserVO> pageByQuery(Page<UserVO> page, @Param("query") UserQuery<UserVO> query);


}
